(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.PI = void 0;
exports.addM = addM;
exports.addN = addN;

function addN(a, b) {
  console.log(a + b);
}

function addM(a, b) {
  console.log(a - b);
}

var PI = 3.14;
/* 
统一暴露:
  - 一般用来暴露多个对象
  - 语法:export {暴露的对象名1,暴露的对象名2,暴露的对象名3,暴露的对象名4}
*/

exports.PI = PI;
},{}],2:[function(require,module,exports){
"use strict";

function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

var calc = _interopRequireWildcard(require("./app"));

var mes = _interopRequireWildcard(require("./mes"));

var _say = _interopRequireDefault(require("./say"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

// 入口文件
console.log('统一暴露', calc.addN, calc.addM, calc.PI); //引入calc所有暴露的内容 并组成一个对象 对象别名为calc

console.log("统一暴露的统一接收", calc); //引入分别暴露的模块内容

console.log("分别暴露", mes.person, mes.time, mes.say, mes.address); //引入分别暴露的模块内容组成的一个对象

console.log("分别暴露的统一接受", mes);
/* 
  引入默认暴露
*/
//这里的暴露的是default对象，别名是say
// export {default as say} from './say'
//只暴露一个文件

console.log("默认暴露", _say["default"]); //验证默认暴露的是一个对象
// import * as o from './say'
// console.log(o, "o");
},{"./app":1,"./mes":3,"./say":4}],3:[function(require,module,exports){
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.person = exports.address = void 0;
exports.say = say;
exports.time = void 0;

/* 
  分别暴露:
    - 在完整的声明语句前 添加 export 关键字 可以暴露当前声明的变量

*/
var person = {
  name: "xiaoA",
  age: 18
};
exports.person = person;
var time = new Date("2022-10-1");
exports.time = time;

function say() {
  console.log("hello world");
}

var address = "sasasaasasasasasasas";
exports.address = address;
},{}],4:[function(require,module,exports){
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

function say() {
  console.log("say hello");
} //默认暴露:主要用于暴露一个内容


var _default = say;
/* 
  默认暴露其实并不是直接暴露某个值,仍然是暴露的一个对象,其实真正的写法是:
  export {
    say as default
  }
*/

exports["default"] = _default;
},{}]},{},[2]);
